package com.cal.utms.action.csefileupload;

import com.cal.utms.dto.csefileupload.IssuerCodeMappingDto;
import com.cal.utms.model.csefileupload.CseFileUploadModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class CseFileUploadAction extends ActionSupport implements ModelDriven<IssuerCodeMappingDto> {

	private static final long serialVersionUID = 1L;
	private IssuerCodeMappingDto codeMappingDto = new IssuerCodeMappingDto();
	private String mappings;

	CseFileUploadModel cseFileUploadModel = new CseFileUploadModel();

	public String getUnMappingCode() {
		cseFileUploadModel.getUnmappingissuerCode(codeMappingDto);
		return Action.SUCCESS;
	}

	// saveissuermapping
	public String saveMapping() {
		cseFileUploadModel.saveMapping(codeMappingDto, mappings);
		return Action.SUCCESS;
	}

	@Override
	public IssuerCodeMappingDto getModel() {
		return codeMappingDto;
	}

	public IssuerCodeMappingDto getCodeMappingDto() {
		return codeMappingDto;
	}

	public void setCodeMappingDto(IssuerCodeMappingDto codeMappingDto) {
		this.codeMappingDto = codeMappingDto;
	}

	public String getMappings() {
		return mappings;
	}

	public void setMappings(String mappings) {
		this.mappings = mappings;
	}

}
